import java.util.Arrays;
import java.util.Scanner;




public class Main {

	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		Rectangle[] rect=new Rectangle[2];
		Circle[] cir=new Circle[2];
		for(int i=0;i<2;i++)
		{
			rect[i]=new Rectangle(sc.nextInt(),sc.nextInt());
		}
		
		for(int i=0;i<2;i++)
		{
			cir[i]=new Circle(sc.nextInt());
		}
		
		int add1=0;
		int add2=0;
		for(int i=0;i<2;i++)
		{
			add1+=rect[i].getPerimeter()+cir[i].getPerimeter();
			add2+=rect[i].getArea()+cir[i].getArea();
		}
		System.out.println(add1);
		System.out.println(add2);
		System.out.println(Arrays.toString(rect));
		System.out.println(Arrays.toString(cir));
	}
}

class Rectangle
{
	private int width;
	private int length;
	
	Rectangle(int width,int length)
	{
		this.width=width;
		this.length=length;
	}
	
	public int getPerimeter()
	{
		return 2*(this.width+this.length);
	}
	
	public int getArea()
	{
		return this.width*this.length;
	}

	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	
	
}


class Circle
{
	private int radius;
	Circle(int radius)
	{
		this.radius=radius;
	}
	
	public int  getPerimeter()
	{
		return (int) (2*Math.PI*this.radius);
	}
	
	public int getArea()
	{
		return (int) (Math.PI*this.radius*this.radius);
	}
	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	
}